home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Programmer Disk
/
The Programmer Disk (Microforum).iso
/
xpro
/
c4
/
pro2
/
1n06042b
< prev
next >
Wrap
Text File
|
1990-10-01
|
420b
|
26 lines
Listing 10
{*
* read_id skips whitespace character and reads an
* identifier from file f into string s.
*}
procedure read_id(var f : text; var s : string);
var
c : char;
begin
s := '';
if seekeof(f) then
;
read(c);
if c in ['A'..'Z', 'a'..'z', '_'] then
begin
repeat
s := s + c;
read(c);
until not (c in ['A'..'Z', 'a'..'z', '0'..'9', '_']);
end;
unread(f);
end;